<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <span>
    <button>按钮一</button>
    <button>按钮二</button>
    
    
    <script>
      // 获取所有button标签
      let btns=document.querySelectorAll('button');
      console.log(btns);
      
      let atns=document.querySelector('button')
      console.log(atns);

    </script>
  </span>
</body>
</html>